<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Products</title>
</head>
<body>
<h2 th:text="'Hello, '+${username}+'!'"/>
<p><a href="/logout">Sign out here</a></p>

<h2>There are all the products:</h2>
<table border="1" cellpadding="2" cellspacing="0">
    <thead>
    <tr>
        <th>Name</th>
        <th>Price</th>
    </tr>
    </thead>
    <tbody>
    <tr th:if="${products.empty}">
        <td colspan="2">No products available</td>
    </tr>
    <tr th:each="book:${products}">
        <td><span th:text="${book.name}">Name</span></td>
        <td><span th:text="${book.price}">Price</span></td>
    </tr>
    </tbody>
</table>
</body>
</html>
